package org.songwang.org.service.impl;

import org.songwang.basic.PageList;
import org.songwang.basic.query.BaseQuery;
import org.songwang.org.domain.Employee;
import org.songwang.org.domain.Systemdictionarydetail;
import org.songwang.org.mapper.IEmployeeMapper;
import org.songwang.org.mapper.ISystemdictionarydetailMapper;
import org.songwang.org.service.ISystemdictionarydetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class SystemdictionarydetailServiceImpl implements ISystemdictionarydetailService {
    @Autowired
    private ISystemdictionarydetailMapper systemdictionarydetailMapper;
   
    @Override
    public List<Systemdictionarydetail> findAll() {
        return systemdictionarydetailMapper.findAll();
    }

    @Override
    public Systemdictionarydetail findById(Long id) {
        return systemdictionarydetailMapper.findById(id);
    }

    @Override
    @Transactional
    public void delete(Long id) {
        systemdictionarydetailMapper.delete(id);
    }

    @Override
    @Transactional
    public void add(Systemdictionarydetail systemdictionarydetail) {
        systemdictionarydetailMapper.add(systemdictionarydetail);
    }

    @Override
    @Transactional
    public void update(Systemdictionarydetail systemdictionarydetail) {
        systemdictionarydetailMapper.update(systemdictionarydetail);
    }

    @Override
    public PageList findQuery(BaseQuery query) {
        Long count = systemdictionarydetailMapper.count(query);
        List<Systemdictionarydetail> query1 = systemdictionarydetailMapper.findQuery(query);

        return new PageList<Systemdictionarydetail>(count,query1);
    }

    @Override
    public Long count(BaseQuery query) {
        return systemdictionarydetailMapper.count(query);
    }
}
